import logging
from yushiminiapp.settings import LOGGIN_CONFIG
class CommonLog(object):

    
    def __init__(self):
        logging.basicConfig(**LOGGIN_CONFIG)

    def console(self,message,level="ERROR"):
        if level == "DEBUG":
            logging.debug(message) 
        elif level == "INFO":
            logging.info(message) 
        elif level == "WARNING":
            logging.warning(message)
        else:
            logging.error(message)        